import { createRequest } from '/@/api/service';
const module = 'ib/base/v1/AppKnowledgeApi/';
/**
 * @function 查询文章列表
 * @param data
 * @param header
 * @returns {Promise}
 */
function APP_KNOWLEDGE_LIST_QUERY(
  data: AppKnowledgeApi.AppKnowledgeListQueryReq,
  header: object = {},
): Promise<AppKnowledgeApi.AppKnowledgeListQueryResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryAppKnowledgeList`,
    data,
    header,
    'POST',
  );
}

/**
 * @function 查询文章详情
 * @param data
 * @param header
 * @returns
 */
function APP_KNOWLEDGE_DETAIL_QUERY(
  data: AppKnowledgeApi.AppKnowledgeDetailQueryReq,
  header: object = {},
): Promise<AppKnowledgeApi.AppKnowledgeDetailQueryResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryAppKnowledgeDetail`,
    data,
    header,
    'POST',
  );
}

export { APP_KNOWLEDGE_LIST_QUERY, APP_KNOWLEDGE_DETAIL_QUERY };
